function jump(n: number): number {
  // 1. 定义状态
  // dp = [每一阶台阶不同的方法]
  // dp[3] = xx
  // 2. 确定状态转移方程
  // dp[i] = dp[i-1] + dp[i-2]
  // 3. 初始化状态
  // dp[0] = 0; dp[1] = 1; dp[2] = 2; dp[3] = 3; dp[4] = 2 + 3;

  let prev = 1;
  let cur = 1;

  for (let i = 2; i <= n; i++) {
    let temp = prev + cur;
    prev = cur;
    cur = temp;
  }

  return cur;
}

console.log(jump(3));
console.log(jump(4));

export {};
